#ifndef MGGS__NODE
#define MGGS__NODE

#include <cstdlib>
#include <iostream>
#include <cstring>
#define MAX 20

class Node
{
private:
    char str[MAX];	
    int num;
    Node* next;
public:
    Node();
    Node(char* _str);
    ~Node();
    int get_num() const;
    void set_num(int data);
    void set_num();
    char* get_str();
    void set_str(char* _str);
    void print();
    Node* get_next() const;
    void set_next(Node* _add);
};

Node::Node()
{
    next = NULL;
    num = 0;
}

Node::Node(char* _str)
{
    strcpy(str,_str);
    next = NULL;
    num = 1;
}

Node::~Node()
{
}

int Node::get_num() const
{
    return num;
};


void Node::set_num(int data)
{
    num = data;
}

void Node::set_num()
{
    num++;
}

char* Node::get_str() 
{
    return str;
}

void Node::set_str(char* _str)
{
    strcpy(str,_str);
}


void Node::print()
{
  std::cout << str << ": " << num << std::endl;
}

Node* Node::get_next() const
{
    return next;
}


void Node::set_next(Node* _add)
{
    next = _add;
}

#else
// DO NOTHING.
#endif
